list=[10,5,6,5,8,7,2]
new_list=[]
for i in list:
    if i not in new_list:
        new_list.append(i)
if len(list)==len(new_list):
    print("没有重复元素")
else:
     print("有重复元素")
